package com.dao.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;

import com.bean.NewFan;
import com.dao.NewFanDao;
@Component
public class NewFanDaoImpl implements NewFanDao{

	@Autowired
	private MongoTemplate mongoTemplate;
	//@Autowired
	//private AvatarUtil avatarUtil;
	public NewFan selectList(String userId){
		Criteria criteria=Criteria.where("userId").is(userId);
		NewFan newFans=mongoTemplate.findOne(new Query(criteria), NewFan.class);
		//newFans=avatarUtil.setNewFanAvatar(newFans);
		return newFans;
	}
}
